﻿@model AutomatedTestDataManagement.Models.TestSuite

@{
    ViewBag.Title = "Edit";
}

<h2>Edit Test Suite</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>TestSuite</legend>

        <div class="editor-label">
            @Html.HiddenFor(model => model.SuiteID)
            @Html.LabelFor(model => model.SuiteName, "Suite Name")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SuiteName)
            @Html.ValidationMessageFor(model => model.SuiteName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SuiteDescription, "Suite Description")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SuiteDescription)
            @Html.ValidationMessageFor(model => model.SuiteDescription)
        </div>
        <div class="editor-label">@Html.LabelFor(model => model.TestSuiteScenarios, "Scenarios in Test Suite")</div>
            <div class="editor-field">
               <table>
                   <tr>
                       <th>Scenario Name</th>
                       <th>Scenario Description</th>
                       <th>Order In Suite</th>
                       <th></th>
                   </tr>
                       @Html.EditorFor(m=>m.TestSuiteScenarios)
                </table>
              </div>

        <p>
            @Html.ActionLink("Add Scenarios to Suite", "Create", "SuiteScenarios", new { id = Model.SuiteID }, null)
        </p>
        
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.Partial("_TestSuiteNav")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
